#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int x,y;
    cin >> x >> y;
    vector<vector<int>> vec;
    vec.clear(); //清空二维数组
    vector<int> num;
    for(int i = 0; i < x; ++i)
    {
        num.clear(); //子数组返回要清空
        for(int j = 0; j < y; ++j)
        {
            int temp;
            cin >> temp;
            num.push_back(temp);
        }
        vec.push_back(num); //将一维数组push到二维数组里
    }

    for(int i = 0; i < x; ++i)
    {
        for(int j = 0; j < y; ++j)
        {
            cout << vec[i][j] << " ";
        }
    }
    return 0;
}
